<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
      <style>
          body{
background-color: red
          }
      </style>
  </head>
  <body>

  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript">
      apiready = function(){
api.showProgress({
    style: 'default',
    animationType: 'fade',
    title: '努力加载中...',
    text: '先喝杯茶...',
    modal: false
});


        ajax();



                 api.addEventListener({
                       name: 'keyback'
                   }, function(ret, err) {
                       api.closeWidget({});
                   });
      };



      function ajax(){
        api.ajax({
            url: $api.getStorage("backapi")+'/index.php?c=api&m=data2&auth=1&param=list action=navigator type=1',
            method: 'post',
        },function(ret, err){
            if (ret) {
              //console.log( JSON.stringify( ret ) );
              imgcache(ret.return)
            } else {
                console.log( JSON.stringify( err ) );
            }
        });

      }

      function imgcache(data){
      //  console.log(data.length);
      var xx = 0;
        for (var i = 0; i < data.length; i++) {
          //console.log(i);
          //console.log(data[i].imgpath);

          api.imageCache({
              url: data[i].imgpath,
              policy:'no_cache',
              encode:true,
            thumbnail:false
          }, function(ret, err) {
              var url = ret.url;
              //console.log(xx);
              if(xx==0){
              $api.setStorage('yindao1', ret.url);
              }else if(xx==1){
              $api.setStorage('yindao2', ret.url);
              }else if(xx==2){
              $api.setStorage('yindao3', ret.url);
                open();
              }



              xx++

          });
        }


      }
  function open(){
    api.openFrameGroup ({
                 name: 's_intro',
                 background: '#fff',
                 scrollEnabled: true,
                 rect: {
                      x: 0,
                      y: 0,
                      w: api.winWidth,
                      h: 'auto'

                 },
                 index: 0,
                 frames: [{
                     name: 'intro_frm1',
                     url: './intro_frm1.html',
                     bounces:false,

                          }, {
                     name: 'intro_frm2',
                     url: './intro_frm2.html',
                     bounces:false,

                 },{
                     name: 'intro_frm3',
                     url: './intro_frm3.html',
                     bounces:false,

                 }]
             }, function(ret, err){
                 if( ret ){
                   api.hideProgress();

                      // console.log( JSON.stringify( ret ) );
                 }else{
                      // console.log( JSON.stringify( err ) );
                 }
             });
  }
  </script>
  </html>
